﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Sherwood.SignOn.Server.Models.ViewModels.SupportViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Translations.Support_Title %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  
    <h2><%= Translations.Support_Title %></h2>
    <script type="text/javascript">
        $(document).ready(function () { showHideUsername(); });
        function showHideUsername() {
            if (document.getElementById('rdHasUserAccount').checked)
                $('.username').each(function () { this.style.visibility = 'visible'; });
            else
                $('.username').each(function () { this.style.visibility = 'hidden'; });
        }
    </script>
      
    <p><%= Translations.Support_Message %></p>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true, Translations.Support_Validation) %>
        
            
            <div class="input-title">
                <%: Translations._Name %> <%: Html.ValidationMessageFor(model => model.Name) %>
            </div>
            <div class="input">
                <%: Html.TextBoxFor(model => model.Name) %>               
            </div>
            
            <div class="input-title">
                <%: Translations._Email %>  <%: Html.ValidationMessageFor(model => model.Email) %>
            </div>
            <div class="input">
                <%: Html.TextBoxFor(model => model.Email) %>               
            </div>

            <div class="input-title">
                <%: Html.RadioButtonFor(model => model.CreatedUserAccount, "true", new { onclick = "showHideUsername();", id="rdHasUserAccount", Checked="true" })%> <%: Translations.Support_CreatedAccount %>
            </div>
            <div class="input-title">
                <%: Html.RadioButtonFor(model => model.CreatedUserAccount, "false", new { onclick = "showHideUsername();", id = "rdNoUserAccount" })%> <%: Translations.Support_HaventCreatedAccount %>
                <br /><br />
            </div>

            <div class="input-title username">
                <%: Translations._Username %> <%: Html.ValidationMessageFor(model => model.Username) %>
            </div>
            <div class="input username">
                <%: Html.TextBoxFor(model => model.Username) %>               
            </div>
            
            <div class="input-title">
                <%: Translations._Country %> <%: Html.ValidationMessageFor(model => model.Country) %>
            </div>
            <div class="input">
                <%= Html.DropDownList("Country", Sherwood.Mvc.Html.CountrySelectList.GetList(ViewData["Country"] == null ? "NO" : ViewData["Country"], false))%>
            </div>
            
            <div class="input-title">
                <%: Translations._Town %>  <%: Html.ValidationMessageFor(model => model.Town) %>
            </div>
            <div class="input">
                <%: Html.TextBoxFor(model => model.Town) %>
            </div>
            
            <div class="input-title">
                <%: Translations.Support_ProblemSubject %> <%: Html.ValidationMessageFor(model => model.Subject)%>
            </div>
            <div class="input">
                <%: Html.TextBoxFor(model => model.Subject)%>               
            </div>
            
            <div class="input-title">
                <%: Translations.Support_ProblemMessage %> <%: Html.ValidationMessageFor(model => model.Message) %>
            </div>
            <div class="input">
                <%: Html.TextAreaFor(model => model.Message, new { rows=8, cols=40 })%> 
            </div> 
            
            <p>
                <input class="link-button" type="submit" value="<%: Translations.Support_SendButton %>" />
            </p>


    <% } %>

</asp:Content>

